Conversation
Add VariantSearchResultConverter to VariantSummaryCurationIndexer so low throughput variant HGVS names are indexed and searchable.
Code ReviewThe change is well-scoped and the overall approach (converting Bug: Unsafe chained access in converter can crash the indexer processIn CuratedVariantGenomicLocationAssociation variantLocation = doc.getVariants().get(0).getCuratedVariantGenomicLocations().get(0);
if (variantLocation == null) {
continue;
}If any
The null check on line 22 only guards against Consider guarding the chained access, e.g.: if (doc.getVariants() == null || doc.getVariants().isEmpty()) continue;
var variant = doc.getVariants().get(0);
if (variant.getCuratedVariantGenomicLocations() == null || variant.getCuratedVariantGenomicLocations().isEmpty()) continue;
CuratedVariantGenomicLocationAssociation variantLocation = variant.getCuratedVariantGenomicLocations().get(0);Everything else looks correct — the two document types use different primary keys so there's no overwrite risk in the shared index, and the converter logic for extracting genes, consequences, and cross-references is sound. |
Summary
VariantSearchResultConvertertoVariantSummaryCurationIndexerso low throughput variant HGVS names are indexed into searchNC_003282.8:g.4017148_4017857del,NC_003281.10:g.3000442G>A)Test plan